Skip to content

disable default instance on xKS clusters#1172

Draft
anandrkskd wants to merge 2 commits into
redhat-developer:masterfrom
anandrkskd:disable-default-instance-on-xks
Draft

disable default instance on xKS clusters#1172
anandrkskd wants to merge 2 commits into
redhat-developer:masterfrom
anandrkskd:disable-default-instance-on-xks

Conversation

@anandrkskd

Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind enhancement

What does this PR do / why we need it:
The default Argo CD instance created in openshift-gitops namespace is a specific requirement for OpenShift, and is not required for xKS cluster. This PR removes the support for the default instance if the controller-manger doesnt find config.openshift.io API installed on the platform.
Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:

Fixes https://redhat.atlassian.net/browse/GITOPS-9943

Test acceptance criteria:

  • Unit Test
  • E2E Test

How to test changes / Special notes to the reviewer:

@openshift-ci openshift-ci Bot added the kind/enhancement New feature or request label Jun 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 929d9bff-06c3-464a-b995-5289b7e3c208

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The pull request refactors how the DisableDefaultInstall option is determined for the GitOps operator. Instead of evaluating the environment variable at controller wiring time, the logic is consolidated into a single disableDefault variable computed at startup that accounts for both the environment variable and the cluster type (OpenShift vs. non-OpenShift).

Changes

DisableDefault Initialization and Controller Wiring

Layer / File(s) Summary
DisableDefault initialization with OpenShift detection
cmd/main.go
A disableDefault boolean is initialized from the environment variable and conditionally forced to true for non-OpenShift clusters.
ReconcileGitopsService controller wiring
cmd/main.go
The ReconcileGitopsService controller uses the precomputed disableDefault value instead of inline environment variable evaluation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: disabling the default Argo CD instance on xKS (non-OpenShift) clusters, which is the primary objective of this PR.
Description check ✅ Passed The description clearly explains the purpose of the PR, including what changed and why it was needed, making it directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from chetan-rns and keithchong June 9, 2026 11:35
@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign trdoyle81 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@anandrkskd anandrkskd marked this pull request as draft June 9, 2026 13:21
@anandrkskd

Copy link
Copy Markdown
Contributor Author

/retest

Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
…shift.io API doesn't exist. Gate on config.openshift.io presence before configuring SSO.

assisted-by: claude-code
Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
@anandrkskd anandrkskd force-pushed the disable-default-instance-on-xks branch from 9aafd89 to 2b77b2b Compare June 10, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant